function bubble(arr) {
    for (let j = 0; j < arr.length; j++) {
        for (let i = 1; i < arr.length - j; i++) {
            if (arr[i] < arr[i - 1]) {
                let temp = arr[i]
                arr[i] = arr[i - 1]
                arr[i - 1] = temp
            }
        }
    }

}
let array = [100, 23, 45, 12, 25, 3, 90, 34]
bubble(array)
console.log(array)